class ComputerParrts {
    private String name;
    private String brand;

    public ComputerParrts(String name,String brand) {
        this.name = name;
        this.brand = brand;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getBrand() {
        return brand;
    }

    public void setBrand(String brand) {
        this.brand = brand;
    }
}
//定义鼠标了类
class Mouse extends ComputerParrts implements USB,ClickEvent{

    public Mouse(String name, String brand) {
        super(name, brand);
    }

    @Override
    public void connect() {
        System.out.println(getBrand()+getName()+"成功连接电脑~");
    }

    @Override
    public void disconnect() {
        System.out.println(getBrand()+getName()+"成功断开与电脑的连接~");
    }

    @Override
    public void click() {//访问接口中常量
        System.out.println(EVENT+":点击了"+getBrand()+getName());
    }
}
abstract class Keyboard implements USB{
    //可不重写接口方法
}
abstract class U implements USB{
    @Override
    public void connect() {
        System.out.println("U盘连接电脑");
    }
}
//定义台灯类
class DeskLamp implements USB{
    public void open(){
         System.out.println("开灯，关灯");
    }
    @Override
    public void connect() {
        System.out.println("含USB接口台灯 连接了电脑");
    }
    @Override
    public void disconnect() {
        System.out.println("含USB接口台灯 断开了与电脑的连接");
    }
}

